package cn.itcast.service.impl;

import cn.itcast.bean.HotWords;
import cn.itcast.redis.StringRedisService;
import cn.itcast.repository.TestRepository;
import cn.itcast.service.IDubboDemoService;
import com.alibaba.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**
 * @Description :
 * @Auther : zj
 * @Date : 2019/1/17 10:06
 */
//@Service(interfaceClass = IDubboDemoService.class)
@Service(version = "1.0.0")
public class IDubboDemoServiceImpl implements IDubboDemoService {
    @Autowired
    private TestRepository repository;
    @Autowired
    private StringRedisService redisService;
    @Override
    public String helloDubbo() {
        return "hello dubbo, 我是提供者";
    }

    @Override
    public List<HotWords> hotwordsListByConf(List<String> ids) {
        return repository.hotwordsListByConf(ids);
    }

    @Override
    public List<HotWords> hotwordsList(int type) {
        return repository.hotwordsList(type);
    }

    @Override
    public String getRedis(String key) {
        return redisService.get(key);
    }


}
